<?php
/*
company:tiesh.com 
project:common
function: 支付功能

created by: 刘盾
created date: 2017-01-09
description:

modification v0.04
modified by:
description:

*/
namespace app\common\controller;
// use think\Controller;

// class PayController extends Controller {
class Pay {
	
	//管理员现金支付
	function admin(){$this->ajaxReturn(model('pay')->admin($_REQUEST));}
	//会员账户支付
	function account(){$this->ajaxReturn(model('pay')->account($_REQUEST));}

	//微信/支付宝 刷卡支付
	function scan(){$this->ajaxReturn(model('pay')->scan($_REQUEST));}

	//微信支付js密钥 用于微信内置浏览器
	function tenpay_jsapi(){$this->ajaxReturn(model('pay')->tenpay_jsapi($_REQUEST));}
	//微信二维码网页支付密钥 用于非微信浏览器
	function tenpay_qrcode(){$this->ajaxReturn(model('pay')->tenpay_qrcode($_REQUEST));}
	//微信被动接收支付密钥 
	function tenpay_reveive(){model('pay')->tenpay_reveive($_REQUEST);}

	//支付宝二维码网页支付密钥 用于用户主动扫码支付
	function alipay_qrcode(){$this->ajaxReturn(model('pay')->tenpay_qrcode($_REQUEST));}
	//查询
	function query(){$this->ajaxReturn(model('pay')->query($_REQUEST));}
	//退款
	function refund(){$this->ajaxReturn(model('pay')->refund($_REQUEST));}

	//2017-01-09 _old
	//2017-01-09 _old
	//2017-01-09 _old
	//2017-01-09 _old
	//2017-01-09 _old
	//2017-01-09 _old

	//微信APP支付 微信扫码支付 被动回执接口 可以在查看配置的logs文件夹中查看模型操作
	function wx_receive(){$this->tenpay_reveive();}
	//扫码
	function wx_scan(){$this->scan();}
}
